/**
 *  读取app信息
 * 
 * 每次更改json后，一定要`重新打开`当前页面，`不是刷新`该页面
 */

function readAppInfo() {
  var currentUrl = getOrigin();
  let domain = utf16to8(currentUrl);

  var file = ''
  if(rxPlatform === 'android') {
    file = domain + '/json/android.json';
  }
  else {
    file = domain + '/json/ios.json';
  }

  jQuery.getJSON(file,
    function (data){
      appInfo.name = data.name || '';
      appInfo.version = data.version || '';
      appInfo.build = data.build || '';
      appInfo.desc = data.desc || [];
      appInfo.url = data.url || '';
      if(rxPlatform === 'pc') {
        writeAppName();
      }
      else {
        writeAppInfo();
      }
    }
  );
}